package com.gec.zhs.excutorTask;

import com.gec.zhs.service.StatisticsInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author zhs
 * @version 1.0
 * @date 2025-03-15
 * @description
 */
@Component
public class UserCenterDataTask {

    @Autowired
    private StatisticsInfoService statisticsInfoService;

    /**
     * 定时处理昨天的数据
     * 点赞、投币、收藏、批量、弹幕、私信、播放量等
     */
    @Scheduled(cron = "0 0 0 * * ?")
    public void calculateData(){
        //每天0点统计数据
        statisticsInfoService.statisticsData();
    }
}
